﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

namespace Sasc.PV.Web
{
    public class BooleanBoundField : BoundField
    {
        protected override string FormatDataValue(object dataValue, bool encode)
        {
            if (dataValue != null && dataValue.GetType() == typeof(Boolean))
            {
                if ((bool)dataValue)
                    return "是";
                else
                    return "否";
            }
            return base.FormatDataValue(dataValue, encode);
        }
    }
}